package com.share.example.selenium.web;

import com.share.common.common.Result;
import com.share.example.selenium.service.IBaseConfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author author
 * @since 2023-10-15
 */
@RestController
@RequestMapping("/conf")
public class BaseConfController {
    @Autowired
    private IBaseConfService baseConfService;

    //重新加载配置
    @RequestMapping("/reLoadConf")
    public Result reLoadConf() {
        return Result.success(baseConfService.init());
    }

    //清除groovy脚本
    @RequestMapping("/cleanAllGroovy")
    public Result cleanAllGroovy() {
        return Result.success(baseConfService.cleanAllGroovy());
    }
}
